/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.datatransferobjects;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Priyanka
 */
public class LecturerDTO extends UserDTO implements Comparable,Serializable{
    
   
    private String lecturername;
    private List<ModuleDTO> moduleList;

    public LecturerDTO(){
        super();
    }
    public LecturerDTO(String username, String lecturername, String userId, String password, String role, String email) {
        super(userId, password, role, email,username);
        
        this.lecturername = lecturername;
    }

    public List<ModuleDTO> getModuleList() {
        return moduleList;
    }

    public boolean addModule(ModuleDTO module)
    {
        if(moduleList!=null)
        {
            moduleList.add(module);
            return true;
        }
        return false;
    }
    
    public void setModuleList(List<ModuleDTO> moduleList) {
        this.moduleList = moduleList;
    }

  

    public String getLecturername() {
        return lecturername;
    }

  

    public void setLecturername(String lecturername) {
        this.lecturername = lecturername;
    }

    @Override
    public int compareTo(Object o) {
        if(((LecturerDTO)o).getUserId().equalsIgnoreCase(this.getUserId()))
                return 0;
        else
            return -1;
    }
    
    
}
